package com.css.ids.server.util;

import java.util.Random;

public class CheckCodeUtil {
	private static final String CHECK_CODE = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
	public static String generateCheckCode(int len){
		int codeLen = CHECK_CODE.length();
		Random rand = new Random(System.currentTimeMillis());
		StringBuffer sb = new StringBuffer();
		for(int i=0;i<len;i++){
			sb.append(CHECK_CODE.charAt(rand.nextInt(codeLen-1)));
		}
		return sb.toString();
	}
}
